/*
 * @Author: 107w 8801453+lu-shangru@user.noreply.gitee.com
 * @Date: 2023-04-04 16:06:16
 * @LastEditors: 107w 8801453+lu-shangru@user.noreply.gitee.com
 * @LastEditTime: 2023-08-08 14:17:35
 * @Description:
 *
 * Copyright (c) 2023 by 107w, All Rights Reserved.
 */
import request from '@/utils/request'
// 获取全部目录及终端信息
export function getAllTreeTerminal(params) {
  return request({
    url: '/directory/getAllTreeTerminal',
    method: 'get',
    params
  })
}
// 用户和目录，终端关系
export function getRelationList(params) {
  return request({
    url: '/directory/getRelationList',
    method: 'get',
    params
  })
}
// 获取目录列表
export function directoryGetTree(params) {
  return request({
    url: '/directory/getTree',
    method: 'get',
    params
  })
}
// 新增、更新目录
export function directoryAddOrUpdate(data) {
  return request({
    url: '/directory/addOrUpdate',
    method: 'post',
    data
  })
}
// 新增、更新目录
export function directoryDelete(params) {
  return request({
    url: '/directory/deleteById',
    method: 'post',
    params
  })
}
// 获取用户、目录、终端的关系
export function getRelationByUserId(params) {
  return request({
    url: '/directory/getRelationByUserId',
    method: 'get',
    params
  })
}
// 保存用户、目录、终端的关系
export function relationAdd(data) {
  return request({
    url: '/directory/relationAdd',
    method: 'post',
    data
  })
}
